<div class="dd-handle dd-nodrag dd-primary">支付方式配置
    <span class="pull-right">
        <a class="fa fa-plus pt5 pull-right add-select" id="addPay" href="#"></a>
    </span>
</div>
<ol class="dd-list" data-field="pay" data-type="flat">
    <li class="dd-item">
        <div class="dd-content">
            <div class="row sortable">
                <% _.each(pays, function(pay){ %>
                    <div style="width:10%;" class="col-lg-3 col-md-4 col-xs-6 thumb" data-field="-" data-value="<%= pay.id %>" data-type="int">
                        <div class="row">
                            <a href="#" class="close delete-pay" data-id=<%= pay.id %>>x</a>
                            <a title="<%= pay.title %>(<%= pay.remark %>)" href="<%= pay.icon %>" class="thumbnail image-popup" data-id="<%= pay.id %>">
                                <img src="<%= pay.icon %>" alt="图像丢失">
                            </a>
                        </div>
                    </div>
                <% }) %>
            </div>
        </div>
    </li>
</ol>

    <!-- Panel popup -->
<div id="addPayPanel" class="popup-basic popup-lg bg-none mfp-with-anim mfp-hide">
    <div class="panel">
        <div class="panel-heading">
            <span class="panel-icon"><i class="fa fa-pencil"></i></span>
            <span class="panel-title">添加Pay</span>
        </div>
        <div class="panel-body">
            <form class="form-horizontal" role="form">
                <div class="form-group" id="coupon-group">
                    <label for="inputPay" class="col-md-2 control-label">请勾选：</label>
                    <div class="col-md-6">
                        <% var selected = _.pluck(pays, 'id'); %>
                        <select id="inputPay" class="form-control" multiple>
                            <% _.each(allPays, function(pay){
                            if(selected.indexOf(pay.id) >= 0 )return; %>
                                <option value="<%= pay.id %>">
                                    <%= pay.title %>
                                    <%= pay.remark ? "(" + pay.remark + ")" : "" %>
                                </option>
                            <% }) %>
                        </select>
                    </div>
                </div>
            </form>
        </div>
        <div class="panel-footer text-right">
            <button class="btn btn-primary" type="button" id="submitAddPay">确定</button>
        </div>
    </div>
</div>